package com.tiancheng.onecode.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.tiancheng.onecode.entity.Member;
import com.tiancheng.onecode.entity.MemberSubOrder;
import com.tiancheng.onecode.mapper.MemberMapper;
import com.tiancheng.onecode.mapper.MemberSubOrderMapper;
import com.tiancheng.onecode.service.IMemberService;
import com.tiancheng.onecode.service.IMemberSubOrderService;
import org.springframework.stereotype.Service;

import java.time.LocalDateTime;
import java.util.List;

/**
 * @Author: kellen
 * @Description:会员子订单
 * @Date: create in 2024/12/9 18:22
 */
@Service
public class MemberSubOrderServiceImpl extends ServiceImpl<MemberSubOrderMapper, MemberSubOrder> implements IMemberSubOrderService {

    @Override
    public List<MemberSubOrder> queryByOrderId(String orderId) {
        return this.list(new LambdaQueryWrapper<MemberSubOrder>().eq(MemberSubOrder::getOrderId,orderId));
    }

    @Override
    public List<MemberSubOrder> waitVerificationSubOrders(LocalDateTime endTime) {
        return getBaseMapper().waitVerificationSubOrders(endTime);
    }
}
